
# Declare the global variable outside the functions
initial_layout_global = 0

def get_jlayout():
    global initial_layout_global
    if initial_layout_global == 0:
        initial_layout_global = 1
        initial_layout = []
        initial_layout.append(json.loads(get_general_control_panel_layout()))
        testapp_layout_obj = json.loads(get_testapp_layout())
        for obj in testapp_layout_obj :
            initial_layout.append(obj)
        return json.dumps(initial_layout)
    else:
        return xrn_main_window_global.jlayout_str

root_tk_global = tk.Tk() 
root_tk_global.title(os.path.basename(__file__).replace(".py","")) 

if __name__ == "__main__":
    initial_layout_global = 0
    xrn_main_window_global = xrn_main_window(root_tk_global, "" )
    xrn_main_window_global.show() 
    root_tk_global.mainloop()
